<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Fetch Google Contacts via OAuth</title>
  </head>
  <body>
    <h1>Fetch Google Contacts via OAuth</h1>
      <h2>Management</h2>
      <a href='https://www.google.com/accounts/IssuedAuthSubTokens'>Revoke access</a>
      <p>
      <a href='{{ logout }}'>Logout</a>
      <p>

    {% if contacts %}
      <h2>Contact List</h2>
      <ul>
      {% for entry in contacts %}
        <li>
          {{ entry.name }}: {{entry.email}}
        </li>
      {% endfor %}
      </ul>
    {% endif %}

    {% if approval_url %}
      Please <a href='{{ approval_url }}'>grant permission</a> to access
      your contacts.
    {% endif %}

    {% if error_code %}
      Error code: {{ error_code }}<p>
    {% endif %}

    {% if error_text %}
      Error text:
<pre>
{{ error_text }}
</pre>
    {% endif %}

    {% if all_data %}
Debug information:<p>
{{ all_data }}
<p>
    {% endif %}
  </body>
</html>
